﻿namespace DotNet.WinForm.Utilities.Controls
{
    public class DotNetMultilineTextBox : DevExpress.XtraEditors.MemoEdit
    {
        public DotNetMultilineTextBox()
        {
            this.Properties.ScrollBars = System.Windows.Forms.ScrollBars.None;
        }

        public bool UseVisualStyleBackColor { get; set; }

        private System.Drawing.ContentAlignment _align = System.Drawing.ContentAlignment.MiddleLeft;

        public System.Drawing.ContentAlignment TextAlign
        {
            get { return _align; }
            set { _align = value; }

        }  public bool Multiline { get; set; }

        public bool ReadOnly
        {
            get { return this.Properties.ReadOnly; }
            set
            {
                this.Properties.ReadOnly = value;
            }
        }

        public System.Windows.Forms.ScrollBars ScrollBars
        {
            get
            {
                return this.Properties.ScrollBars;
            }
            set
            {
                this.Properties.ScrollBars = value;
            }
        }

        public int MaxLength { get; set; }

        public bool UseSystemPasswordChar { get; set; }

        public char PasswordChar { get; set; }

        public void Clear()
        {
            this.Text = "";
        }

        public void AppendText(string p)
        {
            this.Text = this.Text + p;
        }
    }
}